package com.woniu.userservice.controller;

import com.woniu.userservice.entity.Messages;
import com.woniu.userservice.service.MessagesService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("messages")
public class MessagesController {
    @Resource
    private MessagesService messagesService;

    @GetMapping("selectOne")
    public Messages selectOne(Integer id) {
        return messagesService.queryById(id);
    }
    /**
     * Description : TODO  添加一条提示消息<br/>
     * ChangeLog : 1. 创建 (2020/3/25 11:21 [李浪]);
     *
     * @return null
    */
    @GetMapping("add")
    public Messages add(Messages messages) {
        return messagesService.insert(messages);
    }
}